package org.inspursc.s0517.health.evaluation.service;

import org.inspursc.s0517.health.evaluation.dto.SurveyAnswerDTO;
import org.inspursc.s0517.health.evaluation.dto.SurveyAnswerDateDTO;
import org.inspursc.s0517.health.evaluation.dto.SurveyAnswerGradeDTO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 * 问卷回答记录
 *
 * @author B_Dream
 * @date 2018/6/6 16:27
 */
public interface SurveyAnswerService {

    /**
     * 保存回答记录
     *
     * @param answerDTO
     * @throws Exception
     */
    SurveyAnswerGradeDTO saveAnswer(SurveyAnswerDTO answerDTO, HttpServletRequest request) throws Exception;

    /**
     * 根据问卷Id及人员ID获取数据
     *
     * @param suId
     * @param perId
     * @return
     */
    SurveyAnswerDTO findOneBySuAndPer(Integer suId, Integer perId) ;

    /**
     * 根据回答问卷信息ID获取
     *
     * @param id
     * @return
     */
    SurveyAnswerGradeDTO findOneById(Integer id);

    SurveyAnswerDateDTO getAnswerDetailById(Integer id, HttpServletRequest request);

    boolean deleteAnswerById(Integer id);

    /**
     * 根据被调查人员批量获取
     * @param id
     * @return
     */
    List<SurveyAnswerDTO> findAllByPersonnel(Integer id);

}
